package me.send.data.service.mapper;

import java.util.List;
import java.util.Map;
import me.send.data.service.BaseMapper;
import me.send.data.service.pojo.User;
import me.send.data.service.provider.UserProvider;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;

public abstract interface UserMapper extends BaseMapper {
    /** 提供给其他 接口 使用 2015年6月18日16:37:03 **/
    @Select(value = "select nickname,userid from user where userid = #{userid}")
    public abstract Map<String, Object> map_userid(Integer userid);
    
    @Select(value = "select * from user")
    public abstract List<User> list();
    
    @Select(value = "select count(1) as total from user")
    public abstract int count();
    
    // 使用后台界面的分页操作 2015年7月8日16:51:09
    @SelectProvider(method = "list_page", type = UserProvider.class)
    public abstract List<Map<String, Object>> list_page(
	    Map<String, Object> parameter);
    
    @SelectProvider(method = "count", type = UserProvider.class)
    public abstract int count(Map<String, Object> parameter);
    
    @SelectProvider(method = "batch_delete", type = UserProvider.class)
    public abstract void batch_delete(Map<String, Object> parameter);
}
